<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>个人中心</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css" />
      <link rel="stylesheet" type="text/css" href="../../css/common.css" />
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    	<link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
      <style>
          html, body {width: 100%;min-height: 100%;background: #F3EFEE;}
          .aui-active .aui-bar-tab-label{
            color: #f5a51c
          }
          .login {height:11rem;}
      	  .login .personal_logo {width: 3rem;height: 3rem;border-radius: 50%;}
      		.login .userinfo .title {font-size: 0.8rem; color: #fff;}
      		/* 设置条目 */
      		.item {height: 3rem;line-height: 3rem;padding-left: 0.7rem;background-color: #fff;}
      		.item_ico {float: left;width: 2.3rem;padding: 0.7rem 0.7rem 0.7rem 0;}
      		.item_arrow {float: right;width: 1.5rem;padding: 1rem 0.7rem 1rem 0;}
      		.item span {font-size: 0.7rem;}
          [v-cloak] {
              display: none;
          }
          header{
            background: #40434A !important;
            color: #ffffff !important
          }
          header .aui-btn span,header a{
            color: #ffffff !important
          }
          .aui-title{
            color: #ffffff !important
          }
          .userinfo{
            width: 100% !important;
            height: 100% !important;
            padding-top: 15%;
            position: relative;
            text-align: center;
          }

      </style>
  </head>
  <body>
<div id="app" v-cloak>

  <header id="header_top" class="aui-bar aui-bar-nav aui-bar-light">
  <a class="aui-pull-left aui-btn" onclick="goback()">
      <span class="aui-iconfont aui-icon-left"></span>
  </a>
  <div class="aui-title">店铺余额</div>
  <a class="aui-pull-right" onclick="goList()">
      明细
  </a>
  </header>

  <div class="aui-refresh-content">

    <div class="aui-content" style="overflow:hidden">
       <div class="login" style="background:#40434A;">
       <!-- <img src="../../image/personal_bkg.jpg" alt="" class="loginbg"> -->


       <div class="userinfo" style="background:url(../../image/my/m57.png) no-repeat center bottom;background-size:90% 90%">

         <div style="text-align:center;width: 100%;">
           <div style="color:#fff;font-size:1.5rem;letter-spacing:0.1rem">¥ {{dataInfo.money | moneyFilter}}</div>
           <div style="color:#fff;font-size: 0.7rem;">店铺余额</div>
         </div>

      </div>

     </div>
    </div>


   <ul class="aui-list aui-media-list">
     <li class="aui-list-item aui-list-item-middle" @click="to_tx()">
         <div class="aui-media-list-item-inner">
             <div class="aui-list-item-media" style="width:3rem">
                 <img src="../../image/my/m48.jpg" class="aui-img-round aui-list-img-sm" style="width: 2rem;height: 2rem;">
             </div>
             <div class="aui-list-item-inner aui-list-item-arrow">
                提现
             </div>
         </div>
     </li>
     <li class="aui-list-item aui-list-item-middle" @click='my_card()'>
         <div class="aui-media-list-item-inner">
             <div class="aui-list-item-media" style="width:3rem">
                 <img src="../../image/my/m49.jpg" class="aui-img-round aui-list-img-sm" style="width: 2rem;height: 2rem;">
             </div>
             <div class="aui-list-item-inner aui-list-item-arrow">
                我的银行卡
             </div>
         </div>
     </li>
    </ul>




  </div>
</div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/zepto.js"></script>
  <script type="text/javascript" src="../../script/vue.min.js"></script>
  <script type="text/javascript" src="../../script/utils.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript" src="../../script/aui-tab.js"></script>
  <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  <script type="text/javascript" src="../../script/aui-toast.js"></script>
  <script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
  <script type="text/javascript">

      function goback(){
        api.closeWin();
      }
      function goList(){
        // five_frame_header2
        api.openFrame({
          name: 'mingxi',
          url: './five_frame_header2.html',
          rect: {
            x:0,
            y:0,
            w:'auto',
            h:'auto'
          },
          pageParam: {
              type: '明细',
              name:'StoreTheBalance_Record'

          }
        })
      }

      apiready = function(){

        var toast = new auiToast({})

        api.parseTapmode();


      var vm =  new Vue({
          el:"#app",
          data:{
            abc:'1',
            dataInfo:{}
          },

          mounted:function(){
            var _this = this;
            _this.getShowInfo();

          },
          methods:{
            getShowInfo:function(){
              var _this = this;
              api.ajax({
                url:window.Url.Freestore_balance,
                method:'post',
                data:{
                  values:{
                    token:$api.getStorage("token"),
                    type:1
                  }
                }

              },function(ret,err){

                  if (ret.re == 1) {
                     _this.dataInfo = ret.data;

                  } else {
                      //console.log( JSON.stringify( ret ) );
                      var info = ret.info;
                      toast.loading({
                              title:ret.info,
                              duration:1000
                        },function(ret1){
                          //toast.hide();
                          //api.closeWin();

                          console.log(ret1)
                          setTimeout(function(){
                              toast.hide();
                              api.closeWin();
                          }, 1000)

                        });

                  }

              })

            },
            // 提现
            to_tx:function(){
              $api.setStorage('dp_tx_type', 1);

              api.openWin({
                  name: 'withdraw2_header',
                  url: './headerone.html',
                  pageParam: {
                        msg:'提现',
                        url:'./withdraw2.html'
                  }
              });
            },
            // 我的银行卡
            my_card:function(){
              api.openWin({
                  name: 'bankCard',
                  url: './five_frame_header.html',
                  pageParam: {
                        type:'我的银行卡',
                        name:'bankCard'
                  }
              });
            }
          },

          filters:{
            moneyFilter(value){
              if (value != undefined) return  Base64.decode(value).slice(3,-5)
            }
          }

        })



      };


      //刷新
      function setRefresh() {
          var pullRefresh = new auiPullToRefresh({
              container: document.querySelector('.aui-refresh-content'),
              triggerDistance: 100
          }, function(ret) {

              if (ret.status == "success") {
                  setTimeout(function() {
                      pullRefresh.cancelLoading(); //刷新成功后调用此方法隐藏
                  }, 1500)
              }
          })
      }

  </script>
  </html>
